﻿using System;
using System.Text;

using BizElements.Core.ProviderComponents;

namespace BizElements.Core.SqlServerCe
{
    sealed class SqlServerCeTableRenderer : ITableRenderer
    {
        public void RenderTableName(IDbTable table, StringBuilder output)
        {
            // Special characters must be enclosed in brackets.
            output.Append("[");
            output.Append(table.TableName);
            output.Append("]");
        }

        public void RenderAlias(IDbTable table, StringBuilder output)
        {
            // Special characters must be enclosed in brackets.
            output.Append("[");
            output.Append(table.Alias);
            output.Append("]");
        }
    }
}